<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="orest.front.achieve.AchieveHandler"%>
<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%
String path = request.getContextPath();
String userid = LoginUser.getUserId();
RecordSet classtype = AchieveHandler.getNewEnergyClassList();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <link href="../../common/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="../../common/css/user.css" rel="stylesheet" type="text/css" />
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>

    <SCRIPT>
   	$(document).ready(function(){
	$("#frm").Fvalidate({live:true});
    //富文本编辑器
    KE.show({
		id : 'editorContent',
		resizeMode : 1,
		allowUpload : true,
		afterCreate : function(id) {},
		filterMode : true,
		
		items : ["source","|","fullscreen","undo","redo","print","cut","copy","paste","plainpaste",
"wordpaste","|","justifyleft","justifycenter","justifyright","justifyfull","insertorderedlist","insertunorderedlist","indent","outdent","subscript","superscript","|","selectall","-","title","fontname","fontsize","|","textcolor","bgcolor","bold","italic","underline","strikethrough","removeformat","|","image","flash","media","advtable","hr","emoticons","link","unlink","|","about"]
		});
	
	});
	
	function saveEditContent(){
		if(checkinput()){
			content = KE.util.getPureData("editorContent")
			htmlcontent = KE.html("editorContent");
			
			document.getElementById("SELL_INTRO").value=content;
			document.getElementById("SELL_INTROHTML").value=htmlcontent;
			
			document.frm.action="<%=path%>/membercenter/market?method=addSelloneself";
			document.frm.submit();
		}
	}
	
	function _cancel(){
		window.location.href = "<%=path%>/membercenter/market?method=selloneselfList"
	}
	
	function checkinput(){
		if(!$("#frm").Fvalidate()){return false;}
		var ck = document.getElementsByName("SELL_COOPERATEWAY");
		var checkedcount = 0;
		for(i=0;i<ck.length;i++){
			if(ck[i].checked){
				checkedcount++;
				break;
			}
		}
		if(checkedcount<1){
			alert("[合作方式]不能为空");
			return false;
		}
		if(KE.util.getPureData("editorContent")==null || KE.util.getPureData("editorContent").length<20){
			alert("[简要说明]请输入20个汉字以上");
			return false;
		}
		return true;
	}
	function chooseOne(obj){
		var ck = document.getElementsByName(obj.name);
		for(i=0;i<ck.length;i++){
			if(ck[i].value != obj.value){
				ck[i].checked = false;
			}
		}
	}
    </SCRIPT>
</HEAD>

<BODY>

<%@include file="../../common/toplogin.jsp"%>
<%@include file="../../common/topbanner.jsp"%> 
<%@include file="../../common/topmenu.jsp"%> 


<div id="contentmain">
 	<div id="content_left">
	  	<%@include file="../include/userbaseInfo.jsp"%>
		
		 <jsp:include   page="../include/marketleft.jsp"    flush="true">   
		      <jsp:param    name="selected"    value="3"    />   
		 </jsp:include>
	 </div>
    
    
    
    <div id="content_right">
      <jsp:include   page="../include/baseTop.jsp"    flush="true">   
		      <jsp:param    name="open"    value="2"    />   
		</jsp:include>
		
      <Br />
      
      
      <form  id="frm" name="frm"  method="post"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="26%" height="32" align="right">自荐项目名称：&nbsp;</td>
          <td width="74%" align="left"><input type="text" maxlength="70" id="SELL_TITLE" name="SELL_TITLE"  size="60" value=""  required="" label="自荐项目名称" class="inputtext"/></td>
        </tr>
        <tr>
          <td align="right" height="32">所属行业领域：&nbsp;</td>
          <td align="left">
          	<select name="SELL_NEWENERGYCLASS" id="SELL_NEWENERGYCLASS">
				<option value="">请选择</option>
			 	 <%
				for(int i=0;i<classtype.size();i++){
					Record ecRecord = classtype.get(i);
				%>
					<option value="<%=ecRecord.getString("OPTIONVALUE","").trim()%>"><%=ecRecord.getString("OPTIONNAME","")%></option>
			   <%
			   }
			   %>
            </select>
          </td>
        </tr>
        <tr>
          <td align="right" height="32">关键词：&nbsp;</td>
          <td align="left"><input type="text" id="SELL_TOPICWORDS" maxlength="100" name="SELL_TOPICWORDS" size="40" value="" required label="关键词" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">合作方式：&nbsp;</td>
          <td align="left">
       		<input type="checkbox" name="SELL_COOPERATEWAY"  value="1" onClick="chooseOne(this)" label="合作方式" >允许出口
                <input type="checkbox" name="SELL_COOPERATEWAY"  value="2" onClick="chooseOne(this)" label="合作方式">限国内转让
                <input type="checkbox" name="SELL_COOPERATEWAY"  value="3" onClick="chooseOne(this)" label="合作方式">不转让
            <input type="checkbox" name="SELL_COOPERATEWAY"  value="4" onClick="chooseOne(this)" label="合作方式">面议
          </td>
        </tr>
        <tr>
          <td align="right" height="32">联系单位：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_LINKUNIT" maxlength="70" name="SELL_LINKUNIT"  size="60" value="" required label="联系单位" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_LINKMAN" name="SELL_LINKMAN" maxlength="15" size="30" value="" required label="联系人" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人电话：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_TEL" name="SELL_TEL"  size="30" value="" maxlength="20" required label="联系电话" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人手机：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_CELLPHONE" name="SELL_CELLPHONE"  size="30" value="" maxlength="15" required label="联系人手机" class="inputtext" rule="number" /></td>
        </tr>
        <tr>
          <td align="right" height="32">联系人Email：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_EMAIL" name="SELL_EMAIL"  size="30" value="" maxlength="30" required label="联系人Email" rule="email" error="Email的格式不正确" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">通讯地址：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_ADDR" name="SELL_ADDR"  size="60" value="" maxlength="70" required label="通讯地址" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">邮编：&nbsp;</td>
          <td align="left"><input type="text" maxlength="6" rule="number" minlength="6" id="SELL_ZIP" name="SELL_ZIP"  size="10" required label="邮编" class="inputtext" /></td>
        </tr>
        <tr>
          <td align="right" height="32">信息有效期：&nbsp;</td>
          <td align="left"><input type="text"  id="SELL_VALID" name="SELL_VALID"  onClick="WdatePicker()" size="10" readonly required label="有效期限" class="inputtext" /></td>
        </tr>
        <tr>
          <td height="32" align="right">简要说明：&nbsp;</td>
          <td align="left">
          	<input type="hidden"  id="SELL_INTRO" name="SELL_INTRO" value="" class="input_text_grey">
            <input type="hidden"  id="SELL_INTROHTML" name="SELL_INTROHTML" value="" class="input_text_grey">
            
            <textarea class=""  id ="editorContent" name="editorContent" error="正文内容不能为空或过于简洁！" label="简要说明" style="width:98%;height:195px;visibility:hidden;word-wrap:break-word;word-break:break-all;"></textarea>
          </td>
        </tr>
        <tr>
          <td height="50">&nbsp;</td>

          <td align="left"><img src="../../common/images/user/botton_6.gif" onClick="javascript:saveEditContent();" style="cursor:hand;"/>
            <img src="../../common/images/user/botton_7.gif" border="0" style="cursor:hand;" onClick="javascript:_cancel();" /> </td>

        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      </form>
    </div>
</div>

    
<%@include file="../../common/bottom.jsp"%>    

</BODY>
</HTML>
